# encoding=utf-8

import time, json, re
import config, instruction
from bot2 import Bot

def prepare(bot):
    bot.send_ins(instruction.to_jinghu())
    pass

def take_money(bot):
    bot.send_ins(instruction.ins_take_money())

def main():
    #
    # 多线程捡钱时，大家都捡不到钱
    #

    for i in range(0, 5):
        userdata = {'username': 'minerbott' + str(i),
                    'password': '123456'}
        username = 'minerbott' + str(i)
        bot = Bot(username, '123456')

        bot.set_register_addr(config.regsi_server)
        bot.set_login_addr(config.login_server)    

        bot.set_prepare(prepare)
        bot.set_task(take_money, 1)
        
        bot.start()

main()
